package com.weitu.threeSimultaneities.projectApproval.service.impl;

import com.weitu.accessory.service.AccessoryUtilService;
import com.weitu.threeSimultaneities.projectApproval.entity.ProjectDesign;
import com.weitu.threeSimultaneities.projectApproval.mapper.ProjectDesignMapper;
import com.weitu.threeSimultaneities.projectApproval.service.ProjectDesignService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class ProjectDesignServiceImpl implements ProjectDesignService {
    @Autowired
    private ProjectDesignMapper projectDesignMapper;
    @Autowired
    private AccessoryUtilService accessoryUtilService;

    private static final Logger logger = LoggerFactory.getLogger(ProjectDesignServiceImpl.class);


    public ProjectDesign selectById (String id) {
        return this.projectDesignMapper.selectById(id);
    }
    public ProjectDesign selectByProjectApprovalId(String id) {
        return this.projectDesignMapper.selectByProjectApprovalId(id);
    }


    public int deleteByProjectApprovalId(String id) {
        ProjectDesign projectDesign=this.selectByProjectApprovalId(id);
        int flag=1;
        if(projectDesign!=null){
            flag=this.projectDesignMapper.deleteByProjectApprovalId(id);
        }
        return flag;
    }

    public int updateByPrimaryKeySelective(Map paramMap) {
        return this.projectDesignMapper.updateByPrimaryKeySelective(paramMap);
    }

    public int insertSelective(Map paramMap) {
        return this.projectDesignMapper.insertSelective(paramMap);
    }
}